package com.it;

import java.util.Random;

public class Arr4 {
    public static void main(String[] args) {
        int[] arr=new int[10];
        Random r=new Random();
        for (int i = 0; i < arr.length; i++) {
           int num=r.nextInt(100)+1;
           arr[i]=num;
        }
        int sum=0;
        for (int i = 0; i < arr.length; i++) {
            sum+=arr[i];
        }
        System.out.println("sum = " + sum);
        int avg=sum/arr.length;
        System.out.println("avg = " + avg);

        int count=0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i]<avg) {
                count++;
            }
        }
       /* System.out.println("count = " + count);
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]+" ");
        }*/
    }
}
